import axios from '../utils/request'

// 查询企业的部门列表
export function departments() {
  return axios({
    url: '/company/department',
    method: 'get'
  })
}

// 删除部门接口
export function belete(id) {
  return axios({
    url: `/company/department/${id}`,
    method: 'DELETE'
  })
}
// 新增部门接口
export function Modifythe(data) {
  return axios({
    url: '/company/department',
    method: 'post',
    data
  })
}
// 根据ID查询部门详情接口
export function Editinginterface(id) {
  return axios({
    url: `/company/department/${id}`,
    method: 'get'
  })
}

// 根据ID编辑部门详情接口
export function editDepar(data) {
  return axios({
    url: `/company/department/${data.id}`,
    method: 'put',
    data

  })
}

